﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="shopcart.aspx.cs" Inherits="yuejilalala.shopcart" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>购物车页面</title>

    <link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
    <link href="../basic/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="../css/cartstyle.css" rel="stylesheet" type="text/css" />
    <link href="../css/optstyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/jquery.js"></script>
           
  　<script>
        //$(function () {
        //    //$("#lb_js").click(function () {
        //    //    var Sum = $("#J_Total").val();
        //    //    $.ajax({
        //    //        type: "post", //要用post方式                 
        //    //        url: "shopcart.aspx/GetValueAjax",//方法所在页面和方法名
        //    //        contentType: "application/json; charset=utf-8",
        //    //        dataType: "json",
        //    //        data: "{sum:'" + Sum + "'}",
        //    //        success: function (data) {
        //    //            data.d;//返回的数据用data.d获取内容
        //    //        },
        //    //        error: function (err) {
        //    //            alert(err);
        //    //        }
        //    //    });
        //    //});    
         
          
        //    addMoney();
        //    //增加按钮事件
        //    $(document).on('click', '.add-number .add', function () {
        //        var _input = $(this).siblings('.number-input');
        //        $(this).siblings('.number-input').val(parseInt(_input.val()) + 1);
               
        //        addMoney();
        //        SumZon();
        //        Dsum();
        //    });
        //    //减少按钮事件
        //    $(document).on('click', '.add-number .minus', function () {
        //        var _input = $(this).siblings('.number-input');
        //        var _val = parseInt(_input.val()) - 1;
        //        if (_val < 0) {
        //            $(this).siblings('.number-input').val('0');
        //        } else {
        //            $(this).siblings('.number-input').val(_val);
        //        }
              
        //        addMoney();
        //        SumZon();
        //        Dsum()
        //    });
        //    //input 输入事件
        //    $('.number-input').keyup(function () {
        //        addMoney();
        //    });

        //    //input失焦事件
        //    $('.number-input').blur(function () {
        //        var this_val = $(this).val();
        //        if (this_val == '' || this_val == 'undefind') {
        //            $(this).val('0');
        //        } else {
        //            $(this).val(this_val);
        //        }
        //    });
        //    //数量事件
        //    function SumZon()
        //    {
        //        var count = 0;
        //        $.each($('.number-input'), function (i, ele) {
        //            count += parseInt($(ele).val());
        //        })
        //        $('#J_SelectedItemsCount').text(count)
               
        //    }


        //     //弹出当前行 统一价格
        //    function Dsum() {
        //           $(".clearfix ").click(function ()
        //           {
        //               var lie = $(".clearfix ").index($(this)[0]);
        //               $('.choose-content ul').each(function (index) {
        //                   var nowPrice = $(this).find('.now-price').attr('data-price');//现价
        //                   var numbers = $(this).find('.number-input').val();//获取输入框的数量

        //                   var now_price_total = nowPrice * numbers;//现价*数量          
                           
        //                   if (index == lie) {
        //                       $(".text_box").val(numbers)
        //                       $(".text-info").children("span").eq(0).html(now_price_total)
        //                   }
        //               })
        //           })
               
        //    }
        //    //金额计算
        //    function addMoney() {
        //        var now_total = 0,
        //            old_total = 0;
             
        //        $('.choose-content ul').each(function (index) {
                    
        //            var oldPrice = $(this).find('.old-price').attr('data-price');//原价
        //            var nowPrice = $(this).find('.now-price').attr('data-price');//现价
        //            var numbers = $(this).find('.number-input').val();//获取输入框的数量
        //            var old_price_total = oldPrice * numbers;//原价*数量
        //            var now_price_total = nowPrice * numbers;//现价*数量
                   
        //            // console.log(old_price_total,now_price_total);
        //            if (now_price_total == 0) {
        //                $(this).find('.now-total-price').html(now_price_total);
                      
        //            } else {
        //                $(this).find('.now-total-price').html('¥' + now_price_total);
                     
        //            }
        //            now_total += now_price_total;
        //            old_total += old_price_total;
        //            $('#J_Total').val(old_total);
        //            $('#J_Total').text(now_total);
        //            $('.pay-num span small').html('¥' + now_total + '元');
        //            if (now_total >= 300) {
        //                $('.pay-num button').addClass('state-buys');
        //            } else {
        //                $('.pay-num button').removeClass('state-buys');
        //            }
                   
        //            SumZon()
        //        })
        //    }
        //})
     </script>
</head>

<body>
    
    <form runat="server">
        
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <input id="Hidden1" type="hidden"  name="Hidden1"/>
        <!--顶部导航条 -->
			<div class="am-container header">
				<ul class="message-l">
					<div class="topMessage">
						<div class="menu-hd">
					 <asp:HyperLink ID="hl_dlm" NavigateUrl="information.aspx" runat="server" Visible="False"></asp:HyperLink>
						<asp:HyperLink ID="hl_dl" NavigateUrl="~/Login.aspx"  target="_top" runat="server">亲，请登录</asp:HyperLink>
						<asp:HyperLink ID="hl_zc" NavigateUrl="~/regiest.aspx"  target="_top" runat="server">免费注册</asp:HyperLink>
						
						</div>
					</div>
				</ul>
				<ul class="message-r">
					<div class="topMessage home">
						<div class="menu-hd"><a target="_top" class="h">
                            <asp:HyperLink ID="HyperLink3" NavigateUrl="~/home.aspx" runat="server">商城首页</asp:HyperLink></a></div>
					</div>
					<div class="topMessage my-shangcheng">
						<div class="menu-hd MyShangcheng"><a  target="_top"><i class="am-icon-user am-icon-fw"></i><asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="information.aspx">个人中心</asp:HyperLink></a></div>
					</div>
					<div class="topMessage mini-cart">
						<div class="menu-hd"><a id="mc-menu-hd"  target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span><asp:HyperLink NavigateUrl="shopcart.aspx" ID="HyperLink5" runat="server">购物车</asp:HyperLink></span><asp:Label  id="J_MiniCartNum"  class="h" runat="server" Text="0"></asp:Label></a></div>
					</div>
					
				</ul>
				</div>

        <!--悬浮搜索框-->

        <div class="nav white">
            <div class="logo">
                <img src="../images/logo.png" /></div>
            <div class="logoBig">
                <li>
                    <img src="../images/logobig.png" /></li>
            </div>

            <div class="search-bar pr">
                <a name="index_none_header_sysc" href="#"></a>
            </div>
        </div>

        <div class="clear"></div>
        <!--购物车 -->
        <div class="concent">
            <div id="cartTable">
                <div class="cart-table-th">
                    <div class="wp">
                        <div class="th th-chk">
                            <div id="J_SelectAll1" class="select-all J_SelectAll">
                            </div>
                        </div>
                        <div class="th th-item">
                            <div class="td-inner">商品信息</div>
                        </div>
                        <div class="th th-price">
                            <div class="td-inner">单价</div>
                        </div>
                        <div class="th th-amount">
                            <div class="td-inner">数量</div>
                        </div>
                        <div class="th th-sum">
                            <div class="td-inner">金额</div>
                        </div>
                        <div class="th th-op">
                            <div class="td-inner">操作</div>
                        </div>
                    </div>
                </div>
                <div class="clear"></div>

                <asp:HiddenField ID="HiddenField1" runat="server" />
        <%--  计算这个div中所有ul中的值↓--%>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        
                <div class="bundle-main choose-content">
                 <table>
                <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand1">
                    <ItemTemplate>
                        <%--购物车迭代区--%>    
                        <ul>
                            <li>
                                <%--所属商家--%>
                                <div class="bundle-hd">
								    <div class="bd-has-promo">店铺:<span class="bd-has-promo-content"></span>&nbsp;&nbsp;</div>
                                      <div class="act-promo">
										<a href="#" target="_blank"><%# Eval("storeName") %><span class="gt">&gt;&gt;</span></a>
								      </div>
                                      <span class="list-change theme-login">编辑</span>
						        </div>
                            </li>
                              <li>
                                 <%-- 内容--%>
                                    <ul class="item-content clearfix">
                                        <li class="td td-chk">
                                            <div class="cart-checkbox ">
                                                <input class="kinds check" id="J_CheckBox_170037950254" name="items[]" value="170037950254" type="checkbox">
                                                <label for="J_CheckBox_170037950254"></label>
                                            </div>
                                        </li>
                                        <li class="td td-item">
                                            <div class="item-pic">
                                                <a href="#" target="_blank" data-title="" class="J_MakePoint" data-point="tbcart.8.12">
                                                    <%--<img src="../images/kouhong.jpg_80x80.jpg" class="itempic J_ItemImg"></a>--%>
                                                <asp:Image style="width:100%" ImageUrl='<%# "images/"+ Eval("proPic")%>' ID="Image1" runat="server" class="itempic J_ItemImg" />
                                                </a>
                                            </div>
                                            <div class="item-info">
                                                <div class="item-basic-info">
                                                    <a href="#" target="_blank" title="迭代的商品名" class="item-title J_MakePoint" data-point='<%#Eval ("ProName") %>'>
                                                        <asp:Label ID="Label2" runat="server" Text=' <%#Eval ("ProName") %>'></asp:Label>
                                                    </a>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="td td-info">
                                            <div class="item-props item-props-can">
                                                <span class="sku-line">规格：
                                                    <asp:Label ID="Label1" runat="server" Text='<%#Eval ("proSpeci") %>'></asp:Label>
                                                </span><span tabindex="0" class="btn-edit-sku theme-login">修改</span>
                                                <i class="theme-login am-icon-sort-desc"></i>
                                            </div>
                                        </li>
                                        <li class="td td-price">
                                            <div class="item-price price-promo-promo">
                                                <div class="price-content">
                                                    <div class="price-line">
                                                        <%--原价--%>
                                                        <em class="price-original old-price" data-price='<%# Eval("proprice") %>'>
                                                        <asp:Label ID="lb_yj" runat="server"  Text='<%# Eval("proprice") %>'> </asp:Label>
                                                        </em>
                                                        <%--原价--%>
                                                    </div>
                                                    <div class="price-line">
                                                       <%-- 现价--%>
                                                        <em class="now-price price-now J_Price" v-model="price" data-price='<%# Eval("proprice") %>'>
                                                          <asp:Label ID="lb_xj" runat="server" Text='<%# Eval("proprice") %>'> </asp:Label>

                                                        </em>
                                                        <%-- 现价--%>
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="td td-amount">
                                            <div class="amount-wrapper ">
                                                <div class="item-amount ">
                                                    <div class="add-number sl">
                                                     
                                                        <%--商品数量切换区--%>
                                                       <%-- <input class="minus am-btn min  "  name="" type="button" value="-" />--%>
                                                        <asp:LinkButton  CommandName="jian" CommandArgument='<%# Eval("id") %>' class="minus am-btn min" ID="LinkButton1" runat="server">-</asp:LinkButton>
                                                        <asp:TextBox Width="20" Height="20"    class="number-input " ID="tb_shu" runat="server" Text='<%# Eval("count") %>'></asp:TextBox>
                                                          <asp:LinkButton CommandName="jia" CommandArgument='<%# Eval("id") %>' class="add am-btn "  ID="LinkButton2" runat="server">+</asp:LinkButton>
                                                        <%--<input class="number-input " name="" type="text" value="1" style="width:30px;" />--%>
                                                     <%--   <input class="add am-btn " name="" type="button" value="+" />--%>
                                                        <%--商品数量切换区--%>
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="td td-sum">
                                            <div class="td-inner">
                                               <span  class="now-total-price">
                                                <%-- 商品数量价格--%>                                                  
                                                    <%# Eval("ssum") %> 
                                                <%-- 商品数量价格--%>
                                               </span>
                                            </div>
                                        </li>
                                        <li class="td td-op">
                                            <div class="td-inner">
                                              
                                                <asp:LinkButton CommandName="del" CommandArgument='<%# Eval("id") %>' ID="lb_del" runat="server">删除</asp:LinkButton>
                                            </div>
                                        </li>
                                    </ul>
                              </li>
                        </ul>
                                
                                  
                                    <div class="clear"></div>
                                    <%--购物车迭代区--%>
                    </ItemTemplate>
                </asp:Repeater>
                    </table>
                 </div>
              <%--  计算这个div中所有ul中的值↑--%>
                     <%-- 购物车结算区↓--%>
                <div class="float-bar-wrapper">
                    <div id="J_SelectAll2" class="select-all J_SelectAll">
                        <div class="cart-checkbox">
                            <input class="allkinds check-all check" id="J_SelectAllCbx2" name="select-all" value="true" type="checkbox">
                            <label for="J_SelectAllCbx2"></label>
                        </div>
                        <span>全选</span>
                    </div>
                    <div class="operations">
                        <a href="#" hidefocus="true" class="deleteAll">删除</a>
                        <a href="#" hidefocus="true" class="J_BatchFav">移入收藏夹</a>
                    </div>
                    <div class="float-bar-right">
                        <div class="amount-sum">
                            <span class="txt">已选商品</span>
                            <em id="J_SelectedItemsCount">0</em><span class="txt">件</span>
                            <div class="arrow-box">
                                <span class="selected-items-arrow"></span>
                                <span class="arrow"></span>
                            </div>
                        </div>
                        <div class="price-sum total-price">
                            <span class="txt">合计:</span>
                            
                            <span class="price">¥<span id="J_Total" name="JTotal"  runat="server"><%=CartSum.ProPrice%></span></span></div>
                        <div class="btn-area">
                            <sapn  id="J_Go" class="submit-btn submit-btn-disabled" aria-label="请注意如果没有选择宝贝，将无法结算">
                                <asp:LinkButton ID="lb_js" runat="server" OnClick="LinkButton1_Click">结&nbsp;算</asp:LinkButton>
                                </sapn>
                        </div>
                    </div>

                </div>
                  </ContentTemplate>
                </asp:UpdatePanel>
               <%-- 购物车结算区↑--%>
                <div class="footer">
                    <div class="footer-hd">
                        <p>
                            <a href="#">恒望科技          <a href="#">恒望科技</a>
                            <b>|</b>
                            <a href="#">商城首页</a>
                            <b>|</b>
                            <a href="#">支付宝</a>
                            <b>|</b>
                            <a href="#">物流</a>
                        </p>
                    </div>
                    <div class="footer-bd">
                        <p>
                            <a href="#">关于恒望</a>
                            <a href="#">合作伙伴</a>
                            <a href="#">联系我们</a>
                            <a href="#">网站地图</a>
                            <em>© 2015-2025枫林火山组 版权所有. </em>
                        </p>
                    </div>
                </div>
            </div>

            <!--操作页面-->
            <div class="theme-popover-mask"></div>
					</form>
				</div>
			</div>
            <!--引导 -->
            <div class="navCir">
                <li><a href="home.aspx l"><i class="am-icon-home "></i>首页</a></li>
                <li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
                <li class="active"><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>
                <li><a href="../person/index.html"><i class="am-icon-user"></i>我的</a></li>
            </div>
    </form>
</body>

</html>
                      